/*
 * Copyright (C) 2025 Tsingteng MicroSystem
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
/**
 * @file osi_dump.c
 * @brief Dump function implementation for Unix Like OS
 */

#include "nfc_osi_api.h"
#include <stdio.h>

/**
 * @brief 输出DUMP信息
 *
 * @param fd 保存DUMP信息的文件描述符
 * @param fmt 格式化字符串
 * @param ... 可变参数，可变数量的参数根据fmt中的格式化指令进行格式化
 */
void osi_dump(int fd, const char *fmt, ...)
{
    va_list ap;
    va_start(ap, fmt);
    vdprintf(fd, fmt, ap);
    dprintf(fd, "\n");
    va_end(ap);
}
